package com.hp.controller;


import com.hp.pojo.AgentApply;
import com.hp.service.AgentApplyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
public class AgentApplyController {
    @Autowired
    AgentApplyService agentApplyService;

    @PostMapping("/GetAllAgentApply")
    public Map<String, Object> GetAllAgentApply() {
        return agentApplyService.GetAllAgentApply();
    }

    @PostMapping("/AcceptAgentApply")
    public Map<String, Object>  AcceptAgentApply(int applyId) {
        return agentApplyService.AcceptAgentApply(applyId);
    }


    @PostMapping("/QuitAgentApply")
    public Map<String, Object> QuitAgentApply (int applyId) {
        return agentApplyService.QuitAgentApply(applyId);
    }

    @PostMapping("/addAgentApply")
    public Map<String,Object> addAgentApply(int userId, String applyPhoto, String applyIdnum, String applyUsername){
        return agentApplyService.addAgentApply(userId, applyPhoto, applyIdnum, applyUsername);
    }
}
